import { request } from '@/request/request';

/**
 * 预约订单确认信息.
 * @param data
 */
export const appointmentConfirm = (data:any): Promise<any>  => {
    return request({ url: '/order/appointmentConfirm', data, method: 'GET' })
}

/**
 * 提交订单信息.
 * @param data
 */
export const submitAppointment = (data:any): Promise<any>  => {
    return request({ url: '/order/submitAppointment', data, method: 'POST' })
}

/**
 * 订单列表.
 * @param data
 */
export const getOrderList = (data:any): Promise<any> => {
    return request({ url: '/order/orders', data, method: 'GET' })
}

/**
 * 订单详情.
 * @param data
 */
export const getOrderDetail = (data:any): Promise<any> => {
    return request({ url: '/order/detail', data, method: 'GET' })
}

/**
 * 发起支付.
 * @param data
 */
export const initiatePayment = (data:any): Promise<any> => {
    return request({ url: '/payment/initiatePayment', data, method: 'POST' })
}

/**
 * 取消订单 退款.
 * @param data
 */
export const cancelOrder = (data:any): Promise<any> => {
    return request({ url: '/order/cancel', data, method: 'POST' })
}

/**
 * 扫码签到.
 * @param data
 */
export const orderSignIn = (data:any): Promise<any> => {
    return request({ url: '/order/signIn', data, method: 'POST' })
}
